var limsSample = Gikam.getPageObject({

    //样本管理-位置变更记录
    getLocationChangeColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'oldValue',
            title: 'T_LIMS_LOCATION_CHANGE.OLDVALUE'
        }, {
            field: 'newValue',
            title: 'T_LIMS_LOCATION_CHANGE.NEWVALUE'
        }, {
            field: 'createdByName',
            title: 'T_LIMS_LOCATION_CHANGE.CREATEDBYNAME'
        }, {
            field: 'createdTime',
            type: 'dateTime',
            title: 'T_LIMS_LOCATION_CHANGE.CREATEDTIME'
        }];
    },

    // 样本管理
    getManageListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, {
            field: 'handleType',
            title: 'T_LIMS_SAMPLE.HANDLETYPE',
            type: 'select',
            category: 'sys',
            width: 140,
            param: {
                codeCategoryId: 'sampleHandleType'
            },
        }, {
            field: 'sampleCode',
            width: 140,
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            styleFormatter: function (row) {
                if (row.expireReminderTime && row.expireReminderTime !== '') {
                    var expireReminderTime = new Date(row.expireReminderTime).getTime();
                    if (expireReminderTime < Date.now()) {
                        return {
                            backgroundColor: 'red'
                        }
                    }
                }
            },
        }, {
            field: 'sampleType',
            width: 140,
            title: 'T_LIMS_SAMPLE.SAMPLETYPE'
        }, {
            field: 'ext$.batchcode',
            width: 140,
            type: 'link',
            title: 'T_LIMS_BATCH.BATCHCODE'
        }, {
            field: 'parentNo',
            title: 'T_LIMS_SAMPLE.PARENTNO',
            width: 140
        }, {
            field: 'oriNo',
            title: 'T_LIMS_SAMPLE.ORINO',
            width: 180
        }, {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS',
            width: 180,
            editor: true,
            type: 'choose',
            category: 'board-choose',
            single: true,
            onAfterChoose: function (data, index) {
                if (!Gikam.isEmpty(data)) {
                    let row = this.getData()[index];
                    data.sampleId = row.id;
                    workspace.window.showMask();
                    Gikam.postText(limsSample.boardUrl + "/update-samples-single", Gikam.getJsonWrapper({}, [null, [data]])).done(function (data) {
                        Gikam.getComp('lims-sample-manage-list-grid').refreshRowById(row.id);
                        Gikam.getComp('location-change-list-grid').refresh();
                    }).always(function () {
                        workspace.window.closeMask();
                    });
                }
            },
            onClean: function (field, value, index) {
                let row = this.getData()[index];
                workspace.window.showMask();
                Gikam.postText(limsSample.boardUrl + "/clean-samples", Gikam.getJsonWrapper({}, [null, [row]])).done(function (data) {
                    Gikam.getComp('lims-sample-manage-list-grid').refreshRowById(row.id);
                }).always(function () {
                    workspace.window.closeMask();
                });
            },
        }, {
            field: 'sampleSize',
            title: 'T_LIMS_SAMPLE.SAMPLESIZE',
            width: 140
        }, {
            field: 'samplingPosition',
            title: 'T_LIMS_SAMPLE.SAMPLINGPOSITION',
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId: 'samplingPosition'
            },
            width: 140
        }, {
            field: 'collectTime',
            title: 'T_LIMS_SAMPLE.COLLECTTIME',
            type: 'dateTime',
            width: 140
        }, {
            field: 'ext$.productname',
            width: 140,
            title: 'T_LIMS_BATCH_SAMPLE_PRODUCT.PRODUCTNAME'
        }, {
            field: 'expiredTime',
            width: 140,
            title: 'T_LIMS_SAMPLE.EXPIREDTIME',
            type: 'dateTime',
            editor: true
        }, {
            field: 'expireReminderTime',
            width: 140,
            title: 'T_LIMS_SAMPLE.EXPIREREMINDERTIME',
            type: 'dateTime',
            editor: true
        }, {
            field: 'receiveAbnormalType',
            title: 'T_LIMS_SAMPLE.RECEIVEABNOMALTYPE',
            width: 140,
            type: 'select',
            firstBlank: false,
            category: 'sys',
            multiple: true,
            param: {
                codeCategoryId_EQ: 'receiveAbnormalType'
            }
        }, {
            field: 'receiveAbnormalRemark',
            title: 'T_LIMS_SAMPLE.RECEIVEABNOMALREMARK',
            width: 140,
        }]
    },

    // 送检样本合格率
    getPassRateColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'sampleCode',
            width: 140,
            title: '样本编号'
        }, {
            field: 'receiveAbnormalType',
            title: 'T_LIMS_SAMPLE.RECEIVEABNOMALTYPE',
            width: 200,
            type: 'select',
            firstBlank: false,
            category: 'sys',
            multiple: true,
            param: {
                codeCategoryId_EQ: 'receiveAbnormalType'
            }
        }, {
            field: 'inStoreTime',
            title: '样本接收时间',
            type: 'dateTime'
        }]
    },

    // 样本有效期提醒
    getSampleExpiredListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, {
            field: 'handleType',
            title: 'T_LIMS_SAMPLE.HANDLETYPE',
            type: 'select',
            category: 'sys',
            width: 140,
            param: {
                codeCategoryId: 'sampleHandleType'
            },
        }, {
            field: 'sampleCode',
            width: 140,
            title: 'T_LIMS_SAMPLE.SAMPLECODE'
        }, {
            field: 'sampleType',
            width: 140,
            title: 'T_LIMS_SAMPLE.SAMPLETYPE'
        }, {
            field: 'ext$.batchcode',
            width: 140,
            title: 'T_LIMS_BATCH.BATCHCODE',
            type: 'link'
        }, {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            width: 140,
            title: 'T_LIMS_SAMPLE.LOCATIONS',
            editor: true,
            type: 'choose',
            category: 'board-choose',
            single: true,
            onAfterChoose: function (data, index) {
                if (!Gikam.isEmpty(data)) {
                    let activedRow = this.getData()[index];
                    data.sampleId = activedRow.id;
                    workspace.window.showMask();
                    Gikam.postText(limsSample.boardUrl + "/update-samples-single", Gikam.getJsonWrapper({}, [null, [data]])).done(function (data) {
                        Gikam.getComp('lims-sample-manage-list-grid').refreshRowById(activedRow.id);
                    }).always(function () {
                        workspace.window.closeMask();
                    });
                }
            },
            onClean: function (field, value, index) {
                let activedRow = this.getData()[index];
                workspace.window.showMask();
                Gikam.postText(limsSample.boardUrl + "/clean-samples", Gikam.getJsonWrapper({}, [null, [activedRow]])).done(function (data) {
                    Gikam.getComp('lims-sample-manage-list-grid').refreshRowById(activedRow.id);
                }).always(function () {
                    workspace.window.closeMask();
                });
            },
        }, {
            field: 'expiredTime',
            width: 140,
            title: 'T_LIMS_SAMPLE.EXPIREDTIME',
            type: 'dateTime',
            editor: true
        }, {
            field: 'expireReminderTime',
            width: 140,
            title: 'T_LIMS_SAMPLE.EXPIREREMINDERTIME',
            type: 'dateTime',
            editor: true
        },]
    },

    // 选择样本
    getChooseListColumns: function () {
        return [{index: true}, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'customerName',
            title: 'T_LIMS_SAMPLE.CUSTOMERCODE',
            width: 140,
        }, {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_LOCATION.LOCATIONDESC2',
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',
            width: 140,
            type: 'choose',
            category: 'board-choose',
            single: true,
            onAfterChoose: function (data, index) {
                var _this = this;
                if (!Gikam.isEmpty(data)) {
                    let activedRow = this.getData()[index];
                    data.sampleId = activedRow.id;
                    workspace.window.showMask();
                    Gikam.postText(limsSampleHandle.boardUrl + "/update-samples-single", Gikam.getJsonWrapper({}, [null, [data]])).done(function (data) {
                        _this.refreshRowById(activedRow.id);
                    }).always(function () {
                        workspace.window.closeMask();
                    });
                }
            },
            onClean: function (field, value, index) {
                var _this = this;
                let activedRow = this.getData()[index];
                workspace.window.showMask();
                Gikam.postText(limsSampleHandle.boardUrl + "/clean-samples", Gikam.getJsonWrapper({}, [null, [activedRow]])).done(function (data) {
                    _this.refreshRowById(activedRow.id);
                }).always(function () {
                    workspace.window.closeMask();
                });
            },
        }];
    },

    // 操作记录
    getFlowListColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'auditStep',
            title: 'T_LIMS_AUDIT_RECORD.AUDITSTEP',
        }, {
            field: 'auditOperation',
            title: 'T_LIMS_AUDIT_RECORD.AUDITOPERATION',
            width: 140
        }, {
            field: 'auditByName',
            title: 'T_LIMS_AUDIT_RECORD.AUDITBYNAME',
        }, {
            field: 'createdTime',
            title: 'T_LIMS_AUDIT_RECORD.CREATEDTIME',
            type: 'dateTime',
            width: 140
        }, {
            field: 'remarks',
            title: 'T_LIMS_AUDIT_RECORD.REMARKS',
        }];
    },

    // 样本管理-入库、出库及销毁
    gethandleListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, Gikam.status.getBpmnColumn(limsSample.handleWorkflow.dbTable), {
            field: 'handleCode',
            title: 'T_LIMS_SAMPLE_HANDLE.HANDELCODE'
        }, {
            field: 'remark',
            title: 'T_LIMS_SAMPLE_HANDLE.REMARK',
            width: 300,
        }, {
            field: 'createdByName',
            title: 'T_LIMS_SAMPLE_HANDLE.CREATEDBYNAME'
        }, {
            field: 'createdTime',
            title: 'T_LIMS_SAMPLE_HANDLE.CREATEDTIME',
            type: 'dateTime'
        }, {
            field: 'createdByOrgName',
            title: 'T_LIMS_SAMPLE_HANDLE.CREATEDBYORGNAME'
        }];
    },

    // 样本管理-返回客户
    getBackHandleListColumns: function (editor) {
        return [{
            checkbox: true
        }, {index: true}, Gikam.status.getBpmnColumn(limsSample.handleWorkflow.dbTable), {
            field: 'handleCode',
            title: 'T_LIMS_SAMPLE_HANDLE.HANDELCODE'
        }, {
            field: 'remark',
            title: 'T_LIMS_SAMPLE_HANDLE.REMARK',
            width: 300,
        }, {
            field: 'recipient',
            title: 'T_LIMS_SAMPLE_HANDLE.RECIPIENT'
        }, {
            field: 'phone',
            title: 'T_LIMS_SAMPLE_HANDLE.PHONE'
        }, {
            field: 'courierNumber',
            title: 'T_LIMS_SAMPLE_HANDLE.COURIERNUMBER',
            editor: editor
        }, {
            field: 'courierCompany',
            title: 'T_LIMS_SAMPLE_HANDLE.COURIERCOMPANY',
            editor: editor,
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId: 'courierCompany'
            }
        }, {
            field: 'address',
            title: 'T_LIMS_SAMPLE_HANDLE.ADDRESS'
        }, {
            field: 'createdByName',
            title: 'T_LIMS_SAMPLE_HANDLE.CREATEDBYNAME'
        }, {
            field: 'createdTime',
            title: 'T_LIMS_SAMPLE_HANDLE.CREATEDTIME',
            type: 'dateTime'
        }, {
            field: 'createdByOrgName',
            title: 'T_LIMS_SAMPLE_HANDLE.CREATEDBYORGNAME'
        }];
    },

    // 样本接收 -- start
    getSampleReceiveListColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'ext$.batchcode',
            title: 'T_LIMS_BATCH.BATCHCODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'ext$.productnames',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 170,
        }, {
            field: 'courierNumber',
            title: 'T_LIMS_SAMPLE.COURIERNUMBER',
            width: 140,
        }, {
            field: 'courier',
            title: 'T_LIMS_SAMPLE.COURIER',
            type: 'select',
            firstBlank: false,
            search: true,
            category: 'sys',
            param: {
                codeCategoryId: 'courier'
            },
        }, {
            field: 'receiveStatus',
            title: 'T_LIMS_SAMPLE.RECEIVESTATUS',
            type: 'select',
            category: 'sys',
            validators: ['notEmpty'],
            param: {
                codeCategoryId_EQ: 'receiveStatus'
            },
        }, {
            field: 'receiveAbnormalType',
            title: 'T_LIMS_SAMPLE.RECEIVEABNORMALTYPE',
            type: 'comboBox',
            multiple: true,
            firstBlank: false,
            category: 'sys',
            param: {
                codeCategoryId_EQ: 'receiveAbnormalType'
            },
        }, {
            field: 'receiveAbnormalRemark',
            title: 'T_LIMS_SAMPLE.RECEIVEABNORMALREMARK',
        }, {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS',
            width: 140,
            // validators: ['notEmpty']
        }]
    },

    getSampleReceiveFormFields: function () {
        return [{
            field: 'receiveStatus',
            title: 'T_LIMS_SAMPLE.RECEIVESTATUS',
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId_EQ: 'receiveStatus'
            },
            firstBlank: false,
            validators: ['notEmpty'],
            onChange: function (field, value) {
                if (value === 'abnormal') {
                    this.showFields(['receiveAbnormalType'])
                    this.addFieldValidator('receiveAbnormalType', ['notEmpty'])
                } else {
                    this.hideFields(['receiveAbnormalType'])
                    this.removeFieldValidator('receiveAbnormalType', ['notEmpty'])
                }
            }
        }, {
            field: 'receiveAbnormalType',
            title: 'T_LIMS_SAMPLE.RECEIVEABNORMALTYPE',
            type: 'comboBox',
            multiple: true,
            category: 'sys',
            firstBlank: false,
            param: {
                codeCategoryId_EQ: 'receiveAbnormalType'
            },
        }, {
            field: 'receiveAbnormalRemark',
            title: 'T_LIMS_SAMPLE.RECEIVEABNORMALREMARK',
        }]
    },
    // 样本接收 -- end

    // 样本异常 -- start
    getSampleAbnormalListColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'ext$.batchcode',
            title: 'T_LIMS_BATCH.BATCHCODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'ext$.productnames',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 170,
        }, {
            field: 'abnormalHandleType',
            title: 'T_LIMS_SAMPLE.ABNORMALHANDLETYPE',
            validators: ['notEmpty'],
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId_EQ: 'abnormalHandleType'
            },
        }, {
            field: 'abnormalHandleRemark',
            title: 'T_LIMS_SAMPLE.ABNORMALHANDLEREMARK',
        }, {
            field: 'receiveAbnormalType',
            title: 'T_LIMS_SAMPLE.RECEIVEABNORMALTYPE',
            type: 'comboBox',
            multiple: true,
            firstBlank: false,
            category: 'sys',
            param: {
                codeCategoryId_EQ: 'receiveAbnormalType'
            },
        }, {
            field: 'receiveAbnormalRemark',
            title: 'T_LIMS_SAMPLE.RECEIVEABNORMALREMARK',
        }, {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS',
        }, {
            field: 'courierNumber',
            title: 'T_LIMS_SAMPLE.COURIERNUMBER',
        }, {
            field: 'courier',
            title: 'T_LIMS_SAMPLE.COURIER',
        }, {
            field: 'senderRemark',
            title: 'T_LIMS_SAMPLE.SENDERREMARK',
        }]
    },

    getSampleAbnormalFormFields: function () {
        return [{
            field: 'abnormalHandleType',
            title: 'T_LIMS_SAMPLE.ABNORMALHANDLETYPE',
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId_EQ: 'abnormalHandleType'
            },
            firstBlank: false,
            validators: ['notEmpty'],
        }, {
            field: 'abnormalHandleRemark',
            title: 'T_LIMS_SAMPLE.ABNORMALHANDLEREMARK',
            type: 'textarea',
            height: 80
        }]
    },
    // 样本异常 -- end
    getSampleFormFields: function () {
        return [{
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            readonly: true,
            validators: ['notEmpty', 'unique[/secure/baseline/samplemanage/samples/action/validate-unique]'],
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            validators: ['notEmpty'],
            type: 'choose',
            category: 'sampleType',
            single: true,
            readonly: true,
            onBeforeChoose: function () {
                return {filter_derivativeType: '0'}
            },
            onAfterChoose: function (rows, index) {
                if (rows) {
                    this.setData({
                        sampleType: rows[0].sampleTypeName,
                        sampleTypeCode: rows[0].sampleTypeCode
                    })
                }
            },
            onClean: function () {
                this.setData({
                    sampleType: '',
                    sampleTypeCode: ''
                })
            },
        }, {
            field: 'sampleName',
            title: 'T_LIMS_SAMPLE.SAMPLENAME',
            validators: ['notEmpty'],
        }, {
            field: 'subjectId',
            title: 'T_LIMS_SAMPLE.SUBJECTID',
            validators: ['notEmpty'],
        }, {
            field: 'sampleSize',
            title: 'T_LIMS_SAMPLE.SAMPLESIZE',
            validators: ['notEmpty', 'integer', 'numRange(0,)'],
        }, {
            field: 'samplingPosition',
            title: 'T_LIMS_SAMPLE.SAMPLINGPOSITION',
            validators: ['notEmpty'],
            type: 'select',
            firstBlank: false,
            search: true,
            category: 'sys',
            param: {
                codeCategoryId: 'samplingPosition'
            },
        }, {
            field: 'identifyCode',
            title: 'T_LIMS_SAMPLE.IDENTIFYCODE',
            validators: ['notEmpty'],
        }, {
            field: 'birthday',
            title: 'T_LIMS_SAMPLE.BIRTHDAY',
            type: 'date',
            validators: ['notEmpty'],
            dateRange: [, Gikam.DateUtils.formatter(new Date(), 'yyyy-MM-dd hh:mm:ss')],
            onChange: function (field, value, index) {
                var age = limsBatch.getAge(value);
                this.setData({
                    age: age
                }, false);
            }
        }, {
            field: 'age',
            title: 'T_LIMS_SAMPLE.AGE',
            validators: ['notEmpty'],
        }, {
            field: 'gender',
            title: 'T_LIMS_SAMPLE.GENDER',
            validators: ['notEmpty'],
            type: 'select',
            firstBlank: false,
            search: true,
            category: 'sys',
            param: {
                codeCategoryId: 'gender'
            },
        }, {
            field: 'ext$.productnames',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            readonly: true,
        }, {
            field: 'customerName',
            title: 'T_LIMS_SAMPLE.CUSTOMERCODE',
            type: 'choose',
            category: 'client-choose',
            single: true,
            onBeforeChoose: function () {
                return {
                    clientStatus_EQ: '1'
                }
            },
            onAfterChoose: function (rows, index) {
                if (rows) {
                    this.setData({
                        customerCode: '',
                        customerName: '',
                        department: ''
                    })
                    this.setData({
                        customerCode: rows[0].clientCode,
                        customerName: rows[0].clientName,
                        department: rows[0].office
                    })
                }
            },
            onClean: function () {
                this.setData({
                    customerCode: '',
                    customerName: '',
                    department: ''
                })
            },
        }, {
            field: 'department',
            title: 'T_LIMS_SAMPLE.DEPARTMENT',
        }, {
            field: 'remark',
            title: 'T_LIMS_SAMPLE.REMARK',
        }];
    },

    // 订单选择样本
    getBatchChooseListColumns: function () {
        return [{index: true}, {
            field: 'ext$.batchcode',
            title: 'T_LIMS_BATCH.BATCHCODE',
            width: 280,
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'sampleName',
            title: 'T_LIMS_SAMPLE.SAMPLENAME',
            width: 140,
        }, {
            field: 'subjectId',
            title: 'T_LIMS_SAMPLE.SUBJECTID',
            width: 140,
        }];
    },

    baseUrl: IFM_CONTEXT + '/secure/baseline/samplemanage/samples',
    batchUrl: IFM_CONTEXT + '/secure/basemodule/business/batchs',
    auditRecordUrl: IFM_CONTEXT + '/secure/baseline/auditrecord',
    sampleHandleUrl: IFM_CONTEXT + '/secure/baseline/samplemanage/sample-handles',
    boardUrl: IFM_CONTEXT + '/secure/baseline/samplemanage/location-boards',
    locationChangeUrl: IFM_CONTEXT + '/secure/basemodule/samplemanage/location-changes',
    batchSampleUrl: IFM_CONTEXT + '/secure/basemodule/business/batch-samples',
    batchSampleProductUrl: IFM_CONTEXT + '/secure/basemodule/business/batch-sample-products',

    handleWorkflow: {
        dbTable: 'T_LIMS_SAMPLE_HANDLE',
        columns: [{
            field: 'id',
            title: 'T_LIMS_SAMPLE_HANDLE.ID'
        }]
    },

    loadBatchDetailPageReadonlyWH: function (row) {
        workspace.window.load(limsSample.batchUrl + '/page/detail-top' + Gikam.param({
            id: row.ext$.batchid
        }))
    },

    loadSampleDetailTopPage: function (row, readonly) {
        Gikam.create('modal', {
            height: '80%',
            width: '70%',
            title: 'BASELINE.BUSINESS.SAMPLE.MODAL.DETAIL',
            url: limsSample.baseUrl + '/page/detail-top' + Gikam.param({
                id: row.ext$.batchsampleid,
                readonly: readonly,
                topPage: '1',
                batchId: row.ext$.batchid,
            }),
        })
    },

    getSampleProcessSampleListColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'status',
            title: 'T_LIMS_SAMPLE.STATUS',
            //width: 140,
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId: 'batchSpeed'
            },
        }, {
            field: 'ext$.batchcode',
            title: 'T_LIMS_BATCH.BATCHCODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleType',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'ext$.productnames',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 170,
        }, {
            field: 'ext$.predictdeliverytime',
            title: 'T_LIMS_BATCH_SAMPLE_PRODUCT.PREDICTDELIVERYTIME',
            type: 'dateTime',
            styleFormatter: function (row) {
                var color = null
                if (row.status === 'draft_recall' || row.status === 'draft_reject')
                    color = 'red'
                return {backgroundColor: color}
            },
            width: 170,
        },/* {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS',
        }*/]
    },

    getSampleProcessSampleListColumnsNew: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'status',
            title: 'T_LIMS_SAMPLE.STATUS',
            //width: 140,
            type: 'select',
            category: 'sys',
            param: {
                codeCategoryId_IN: 'batchSpeed,batchSampleProductStatus'
            },
        }, {
            field: 'batchCode',
            title: 'T_LIMS_BATCH.BATCHCODE',
            width: 140,
            type: 'link'
        }, {
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140,
            type: 'link'
        }, {
            field: 'ext$.sampletype',
            title: 'T_LIMS_SAMPLE.SAMPLETYPE',
            width: 140,
        }, {
            field: 'productName',
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
            width: 170,
        }, {
            field: 'predictDeliveryTime',
            title: 'T_LIMS_BATCH_SAMPLE_PRODUCT.PREDICTDELIVERYTIME',
            type: 'dateTime',
            styleFormatter: function (row) {
                var color = null
                if (row.ext$.limittimeflag == '1')
                    color = 'red'
                return {backgroundColor: color}
            },
            width: 150,
        },/* {
            field: 'ext$.locationdesc',
            title: 'T_LIMS_SAMPLE.LOCATIONS2',// 存放位置
            width: 140,
        }, {
            field: 'locations',
            title: 'T_LIMS_SAMPLE.LOCATIONS',
        }*/]
    },
});
